package com.touchyourheart.model.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "users")
public class User implements Serializable {

  private static final long serialVersionUID = 4505144313877087374L;

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private long id;

  @Column(name = "name", nullable = false, length = 16)
  private String name;

  @Column(name = "eng_name", nullable = true, length = 32)
  private String engName;

  @Column(name = "email", nullable = false, length = 128)
  private String email;

  @Column(name = "pwd", nullable = false, length = 16)
  private String pwd;

  @Column(name = "reg_date", nullable = false)
  @Temporal(value = TemporalType.TIMESTAMP)
  private Date regDate;
}
